package com.yunxi.service.localService.customer.impl;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.customer.SatCustomerIntentionMapper;
import com.yunxi.model.customer.SatCustomerIntention;
import com.yunxi.sat.pojo.SatCustomerClueVO;
import com.yunxi.sat.pojo.SatCustomerFollowDictVO;
import com.yunxi.service.localService.customer.SatCustomerIntentionService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 客户意向信息表 服务实现类
 * </p>
 *
 * @author caoYong
 * @since 2019-07-11
 */
@Service
public class SatCustomerIntentionServiceImpl extends ServiceImplPlus<SatCustomerIntentionMapper, SatCustomerIntention> implements SatCustomerIntentionService {

    /**
     * 通过字典key获取中文
     * @param parentKey
     * @param key
     * @return
     */
    @Override
    public String queryDictCn(String parentKey, String key) {
        SatCustomerFollowDictVO satCustomerFollowDictVO = new SatCustomerFollowDictVO();
        satCustomerFollowDictVO.setParentKey(parentKey);
        satCustomerFollowDictVO.setKey(key);
        return baseMapper.queryDictCn(satCustomerFollowDictVO);
    }

    /**
     * 通过线索编号查询线索
     * @param clueNo
     * @return
     */
    @Override
    public SatCustomerClueVO getClueInfoByNo(String clueNo) {
        return baseMapper.getClueInfoByNo(clueNo);
    }
}
